//
//  ColorPickerBoocamp.swift
//  FCSwiftUI
//
//  Created by 冯宣超 on 2023/3/1.
//

import SwiftUI

struct ColorPickerBoocamp: View {
    @State var backgroundColor: Color = Color.green
    
    var body: some View {
        ZStack {
            backgroundColor.edgesIgnoringSafeArea(.all)
            
            ColorPicker("Select a color", selection: $backgroundColor, supportsOpacity: true)
                .font(.headline)
                .foregroundColor(.white)
                .padding()
                .background(Color.black)
                .cornerRadius(10)
                .padding(50)
        }

    }
}

struct ColorPickerBoocamp_Previews: PreviewProvider {
    static var previews: some View {
        ColorPickerBoocamp()
    }
}
